<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCollPlaceTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        Schema::create('coll_place', function (Blueprint $table) {
            $table->engine = 'MyISAM';
            $table->comment = '地标管理表';
            $table->increments('id')->unsigned()->comment('自增长主键');
            $table->string('name',100)->default('')->comment('地标名称');
            $table->integer('cid')->unsigned()->unique('cid')->default(0)->comment('当前地标编号');
            $table->integer('pid')->unsigned()->index('pid')->default(0)->comment('当前父级编号');
            $table->integer('sort')->unsigned()->index('sort')->default(0)->comment('当前地标排序');
            $table->string('longitude',20)->default('')->comment('地标坐标经度');
            $table->string('latitude',20)->default('')->comment('地标坐标纬度');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::drop('coll_place');
    }
}
